package com.path.planning.mapper.path;


import com.path.planning.entity.path.PointDto;
import com.path.planning.util.path.entity.NavigationVertexMapping;
import com.path.planning.util.path.entity.RailwayData;
import com.path.planning.util.path.entity.RoadData;
import com.path.planning.util.path.entity.WaterwayData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NavigationMapper {
    List<RoadData> queryAllRoad();

    List<Integer> queryAllRoadVertex();

    List<RailwayData> queryAllRailway();

    List<Integer> queryAllRailwayVertex();

    List<WaterwayData> queryAllWaterway();

    List<Integer> queryAllWaterwayVertex();

    PointDto selectRoadNearTopologyPoint(@Param("longitude") Double longitude, @Param("latitude") Double latitude);
    PointDto selectRailwayNearTopologyPoint(@Param("longitude") Double longitude, @Param("latitude") Double latitude);
    PointDto selectWaterwayNearTopologyPoint(@Param("longitude") Double longitude, @Param("latitude") Double latitude);

    Double calculateDistance(@Param("sourceLon") Double sourceLon, @Param("sourceLat") Double sourceLat, @Param("targetLon") Double targetLon, @Param("targetLat") Double targetLat);

    List<NavigationVertexMapping> queryVertexMapping(@Param("type") String type);
}
